package com.ssyan.factory.factorymethod.order;

import com.ssyan.factory.factorymethod.BJCheesePizza;
import com.ssyan.factory.factorymethod.BJPepperPizza;
import com.ssyan.factory.factorymethod.Pizza;


/**
 * @author ssyan
 * @Description TODO
 * @create 2021/8/27 23:45
 * @Version 1.0
 */
public class BJOrderPizza extends OrderPizza{
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new BJCheesePizza();
        }else if (orderType.equals("pepper")) {
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
}
